package com.xmtlxx.system.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.domain.entity.SysForm;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.system.domain.bo.SysFormBo;
import com.xmtlxx.system.domain.vo.SysCheckItemVo;
import com.xmtlxx.system.domain.vo.SysCheckTypeVo;
import com.xmtlxx.system.domain.vo.SysFormVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 业务单Mapper接口
 *
 * @author xmtlxx
 * @date 2022-04-24
 */
public interface SysFormMapper extends BaseMapperPlus<SysFormMapper, SysForm, SysFormVo> {
    /**
     * 根据条件分页查询业务单
     *
     * @param sysFormBo 业务单
     * @return Page SysForm
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    Page<SysFormVo> selectPageSysFormList(@Param("page") Page<SysForm> page,@Param("sysForm") SysFormBo sysForm);

    /**
     * 查询业务单列表
     *
     * @param sysFormBo 业务单
     * @return 业务单集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
        @DataColumn(key = "deptName", value = "s.create_by"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    List<SysFormVo> selectSysFormList(@Param("sysForm") SysFormBo sysForm);

    List<SysCheckTypeVo> selectModelSysFormList(@Param("sysForm") SysFormBo sysForm);

    List<SysCheckItemVo> selectSysFormItemsList(@Param("sysForm") SysFormBo sysForm);
}
